GetBytes(Char[],Int32,Int32,Byte[],Int32) Method
In This Topic
Encodes "charCount" characters from the given string, starting from the character at index "charIndex" and puts them in the specified byte array, starting from "byteIndex".
Syntax
public abstract System.int GetBytes(
System.char[] ,
ref System.int ,
System.int ,
System.byte[] ,
System.int
)
Parameters
- str
- The characters to encode.
- charIndex
- The char index at which to start encoding.
- charCount
- The number of chars to encode.
- bytes
- The byte array in which to put the resulting bytes.
- byteIndex
- The index in the byte array at which to begin putting bytes.
Return Value
The number of resulting bytes.
Requirements
Target Platforms: Windows 11, Windows 10, Windows 7, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)
See Also